from pprint import pprint
from typing import Optional, List

from langchain_core.prompts import ChatPromptTemplate
from langchain_core.runnables import RunnablePassthrough
from langchain_experimental.synthetic_data import *
from pydantic.v1 import Field, BaseModel

from AliUtils import get_model

model = get_model()
chain = create_data_generation_chain(model)

# 生成数据
# result = chain(  # 给于一些关键词， 随机生成一句话
#     {
#         "fields": ['蓝色', '黄色'],
#         "preferences": {}
#     }
# )

result = chain(  # 给于一些关键词， 随机生成一句话
	{
		"fields": {"颜色": ['蓝色', '黄色']},
		"preferences": {"style": "让它像诗歌一样。"}
	}
)
pprint(result)
